<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>组织结构设置</title>
	<link rel="stylesheet" href="${pageContext.request.contextPath }/static/css/mailList.css" />
	<link rel="stylesheet" href="${pageContext.request.contextPath }/static/css/jquery.treetable.css" />
    <link rel="stylesheet" href="${pageContext.request.contextPath }/static/css/复制-jquery.treetable.theme.default.css" />
</head>
<body>
<div>
			<p>系统设置 >> 组织结构设置</p>
			<div id="left">
				<div class="table-box">
			    <table id="example-advanced"  class="tableztree01">
			    	 <tbody>
				    	<c:if test="${orgList != null }">
							<c:forEach var="org" items="${orgList }">
								<tr data-tt-id="${org.id }">
						            <td>${org.nasa }</td>
						        </tr>
						        
						        <c:if test="${depList != null }">
						        	<c:forEach var="dep" items="${depList }">
						        		<c:if test="${dep.oz_by_ogid == org.id }">
							        		<tr data-tt-id="${org.id+1}" data-tt-parent-id="${org.id }">
									            <td>${dep.oz_name }</td>
									        </tr>
								        </c:if>
						        	</c:forEach>
						        </c:if>
							</c:forEach>
						</c:if>
					 </tbody>
			    </table>
				</div>
				
			</div>
			
			<form method="post" action="">
			<div id="right">
				<ul>
					<li>
						组织编码：<input type="text" name="oz_code" value="" /><span>*</span>
						组织简称：<input type="text" name="oz_department" value="" /><span>*</span>
					</li>
					<li>
						组织全称：<input type="text" name="oz_name" value="" /><span>*</span>
						所属组织：<input type="text" name="nasa" value="" /><span>*</span>
					</li>
					<li>
						地&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;址：<input type="text" id="iput" name="oz_address" value="" /><span>*</span>
					</li>
					<li>
						简&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;介：
						<textarea rows="5" cols="50" name="oz_Intro"></textarea>
					</li>
					<li>
						备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注：
						<textarea rows="5" cols="50" name="oz_ogRemarks"></textarea>
					</li>
					<li>
						<input class="input" type="submit" id="save" name="save" value="保存" />
						<input class="input" type="button" id="cancel" name="cancel" value="取消" />
					</li>
				</ul>
				
			</div>
			</form>
		</div>
</body>
	<script type="text/javascript" src="${pageContext.request.contextPath }/static/js/jquery.js"></script>
	<script src="${pageContext.request.contextPath }/static/js/jquery.treetable.js"></script>

	<script language="javascript">
    	$("#example-advanced").treetable({ expandable: true});
	</script>
</html>